find_package(PkgConfig)
pkg_check_modules (AVDEVICE libavdevice)
pkg_check_modules (AVFORMAT libavformat)
pkg_check_modules (AVFILTER libavfilter)
pkg_check_modules (AVCODEC libavcodec)
pkg_check_modules (AVUTIL libavutil)
pkg_check_modules (AVSWSCALE libswscale)
pkg_check_modules (AVSWRESAMPLE libswresample)

add_executable(capture_save capture_save.cpp)
target_link_libraries(capture_save ${AVDEVICE_LIBRARIES})
target_link_libraries(capture_save ${AVFORMAT_LIBRARIES})
target_link_libraries(capture_save ${AVFILTER_LIBRARIES})
target_link_libraries(capture_save ${AVCODEC_LIBRARIES})
target_link_libraries(capture_save ${AVUTIL_LIBRARIES})
target_link_libraries(capture_save ${AVSWSCALE_LIBRARIES})
target_link_libraries(capture_save pthread m)
